
%\documentclass[letterpaper,12pt]{article}
%\usepackage[x11names,rgb]{xcolor}
%\usepackage{tikz}
%\usetikzlibrary{snakes}
%\usetikzlibrary{arrows}
%\usetikzlibrary{shapes}
%\usetikzlibrary{backgrounds}
%\usepackage{amsmath}
%\oddsidemargin 0in
%\evensidemargin 0in
%\topmargin 0in
%\headheight 0in
%\headsep 0in
%\textheight 9in
%\textwidth 6.5in
%\begin{document}
%\pagestyle{empty}
%\vspace*{\fill}
%\begin{center}
\documentclass{article}
 
\usepackage[pdftex,active,tightpage]{preview}
\usepackage{tikz}
\usetikzlibrary{snakes}
\usetikzlibrary{arrows}
\makeatletter
 
\begin{document}
\begin{preview}
	%%
	\begin{tikzpicture}[scale=0.8]
	    	% domain boundary 
	    	\draw (0,0) rectangle (8,8);
	    	% Octree ...
	    	\draw[black, very thin, step=4cm] (0,0) grid (8,8);	
	    	% The blocks ...
	    	\draw[fill=blue!70] (4,7.75) rectangle +(0.25,0.25);
	    	\draw[fill=blue!70] (2.625,2.25) rectangle +(0.125,0.125);
	    	%% completed ones ...
	    	\draw[fill=blue!15] (4,0) rectangle +(4,4);
	    	\draw[fill=blue!15] (0,4) rectangle +(4,4);
	    	\draw[fill=blue!15] (4,4) rectangle +(2,2);
	    	\draw[fill=blue!15] (6,4) rectangle +(2,2);
	    	\draw[fill=blue!15] (4,6) rectangle +(1,1);
	    	\draw[fill=blue!15] (5,6) rectangle +(1,1);
	    	\draw[fill=blue!15] (3,3) rectangle +(1,1);
	    	\draw[fill=blue!15] (2,3) rectangle +(1,1);
	    	\draw[fill=blue!15] (3,2) rectangle +(1,1);
	    	\draw[fill=blue!15] (4,7) rectangle +(0.5,0.5);
	    	\draw[fill=blue!15] (4.5,7) rectangle +(0.5,0.5);
	    	\draw[fill=blue!15] (4,7) rectangle +(0.5,0.5);
	    	\draw[fill=blue!15] (4,7.5) rectangle +(0.25,0.25);
	    	\draw[fill=blue!15] (4.25,7.5) rectangle +(0.25,0.25);
	    	\draw[fill=blue!15] (2,2.5) rectangle +(0.5,0.5);
	    	\draw[fill=blue!15] (2.5,2.5) rectangle +(0.5,0.5);
	    	\draw[fill=blue!15] (2.75,2.25) rectangle +(0.25,0.25);
	    	\draw[fill=blue!15] (2.5,2.375) rectangle +(0.125,0.125);
	    	\draw[fill=blue!15] (2.625,2.375) rectangle +(0.125,0.125);
	    \end{tikzpicture}%%
\end{preview}
\end{document}

%\end{center}
%\vspace*{\fill}
%\end{document}
    